<?php # Script 9.3 - SQL Connection

    # This file contains the MySQL connection info
    # It also performs the connection to MySQL on Stark.

    # Set up connection info as contants.
    DEFINE ('DB_USER', 'php');
    DEFINE ('DB_PASSWORD', 'webpassword');
    DEFINE ('DB_HOST', 'localhost');
    DEFINE ('DB_NAME', 'sitename');
    $charset = 'utf8';
    
    # Connect to MySQL.
    $dbc = @mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
            OR die ('Could not connect to MySQL: ' . mysqli_connect_error());
    
    # Set char encoding to UTF-8
    mysqli_set_charset($dbc, $charset);
